import React from 'react';
import { Link } from 'react-router-dom';
import './Navigation.css';

function Navigation({ isAuthenticated, onLogout }) {
    const targetPath = isAuthenticated ? '/dashboard' : '/signin';

    return (
        <nav className="navigation">
            <div className="nav-brand">
                <Link to="/">ACVP Server</Link>
            </div>
            <div className="nav-links">
                <Link to="/algorithms" className="nav-link">Algorithms</Link>
                <Link to={targetPath} className="nav-link">Apply For Test Account</Link>
                {isAuthenticated && (
                    <button onClick={onLogout} className="nav-link sign-out-button">
                        Sign Out
                    </button>
                )}
            </div>
        </nav>
    );
}

export default Navigation; 